home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Infotip File Any.xpl < prev    next >
Text File  |  2004-01-31  |  3KB  |  84 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="1"
  4. "UIPATH 1"="Appearance\Files&Folders\ANY file"
  5. "UIPATH 2"="Appearance\Files&Folders\Files ToolTips"
  6. "NAME"="Any File Attributes in ToolTip"
  7. "VERSION"="1.10"
  8. "OSVERSION"="0001011"
  9. "LANGUAGE"="VBScript"
  10. "TEXT 1"="Enable Attributes visible in ToolTip "
  11. "DESCRIPTION 1"="If you point the mouse-cursor to a file and wait about two seconds, Windows is able to display a little yellow window (ToolTip) that shows some information about that file like Author, Path, Date etc. This way, you know what the file is about without open it."
  12. "DESCRIPTION 2"="Sometimes, you want to know which attributes (Read-Only, System, Hidden and Archive) a file has set. Normally, you need to right-click the file and open the Properties window which shows you the current attributes."
  13. "DESCRIPTION 3"="With this setting you can also make the Attributes of a file visible within this ToolTip as well. If you often check the attributes of a file, this will be a big timesaver since you do not right-click the file but instead just move your mouse cursor over the file in question."
  14. "DESCRIPTION 4"="NOTE: This setting applies to "simple ToolTips" only. Some file types have their own ToolTip provider and thus the attributes will no be visible within the ToolTip."
  15. "AUTHOR"="Xteq Systems"
  16. "CONTACTURL"="http://www.x-setup.net/"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"=""
  19.  
  20.    sV1="HKEY_CLASSES_ROOT\*\InfoTip"
  21. sV1bak="HKEY_CLASSES_ROOT\*\InfoTip.XSP.Backup"
  22. sDefault="prop:Type;DocAuthor;DocTitle;DocSubject;DocComments;Write;Size"
  23. sApplied="prop:Attributes;" 'Len=16
  24.  
  25. bCurrentStatus=false
  26.  
  27. Sub Plugin_Initialize 
  28.  Call ReadCurState()
  29. End Sub
  30.  
  31. Sub ReadCurState
  32.  s=RegReadValue(sV1)
  33.  if UCase(left(s,16))=UCase(sApplied) then
  34.     SetUIElement 1,true
  35.     bCurrentStatus=true
  36.  end if 
  37. End Sub
  38.  
  39.  
  40. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  41.  b=GetUIElement(1)
  42.  if b=false then
  43.  
  44.     if bCurrentStatus<>false then ' = change!
  45.        'restore original    
  46.        sBak=RegReadValue(sV1bak)
  47.        if len(sBak)=0 then
  48.           Call MsgError("Unable to restore the original value! Will apply default value!")
  49.           Call RegWriteValue(sV1,sDefault,1)
  50.        else
  51.           Call RegWriteValue(sV1,sBak,1)
  52.           Call RegDeleteValue(sV1bak) 
  53.        end if
  54.     end if 
  55.  
  56.  else
  57.     'apply tweak
  58.     
  59.     if bCurrentStatus=false then ' = change!
  60.  
  61.        'do we already have an backup? if so, do NOT save the new value
  62.        if RegValueExists(sV1bak)=true then
  63.           'do nothing
  64.        else
  65.           'save value
  66.           sOrg=RegReadValue(sV1)
  67.           Call RegWriteValue(sV1bak,sOrg,1)
  68.           
  69.           'now apply tweak  
  70.           s=right(sOrg,len(sOrg)-5) 'to remove prop:
  71.           s=sApplied & s
  72.           Call RegWriteValue(sV1,s,1)
  73.        end if
  74.     end if
  75.  end if
  76.  
  77.  Call ReadCurState()
  78. End Sub
  79.  
  80. Sub Plugin_Terminate 
  81. End Sub
  82.  
  83.  
  84.